<!doctype html><html><head><meta charset="utf-8" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="viewport" content="initial-scale=1.0, width=device-width, user-scalable=false" />
<meta name="keywords" content="" /> 
<meta name="description" content="" />
<title>LEKO&trade;</title>
<link rel="icon" type="image/ico" href="favicon.ico" />
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
<link rel="stylesheet" type="text/css" href="leko.css" />
<link rel="stylesheet" type="text/css" href="leko.demo.css" />
<link rel="alternate" type="application/rss+xml" title="" href="leko.xml" />
<script src="jquery.js"></script><script src="leko.js"></script></head><body><div id="page" class="table"><header><nav></nav></header><h2 class="en">jQuery.fn.pile</h2><hr />自动调整元素的<mark class="en"> zIndex </mark>值，使其浮到其<mark class="en"> offsetParent </mark>的最上层显示。<section><h4><b>语法</b></h4><code><i>jQuery</i> = <strong>jQuery</strong>(<i>selector</i>).<strong>pile</strong>([<i>re-calc</i>])</code></section><section><h4><b>参数</b></h4><table border="0" cellspacing="0" cellpadding="0"><thead><tr class="row1"><th class="col2">参数名</th><th class="col2">是否可选</th><th class="col2">缺省值</th><th class="col2">数据类型</th><th class="col2">可能的取值</th><th>说明</th></tr></thead><tbody><tr><td rowspan="3" class="en">re-calc</td><td class="en" rowspan="3">√</td><td class="en" rowspan="3">false</td><td rowspan="2" class="en">boolean</td><td class="en">true</td><td>清除缓存，重新计算<mark class="en"> offsetParent </mark>的<mark class="en"> maxZIndex </mark>值。</td></tr><tr><td class="en">false</td><td>如果还没有为<mark class="en"> offsetParent </mark>创建<mark class="en"> maxZIndex </mark>缓存值，则创建。否则就在每次执行方法时持续在此值上累加。</td></tr><tr><td rowspan="1" class="en">number</td><td class="en"></td><td>手动强制指定元素的<mark class="en"> zIndex </mark>值。为避免IE计算<mark class="en"> zIndex </mark>的bug，建议尽量不要使用负值。</td></tr></tbody></table></section><section><h4><b>返回</b></h4><table border="0" cellspacing="0" cellpadding="0"><thead><tr class="row2"><th class="col2">数据类型</th><th class="col2">可能的取值</th><th>说明</th></tr></thead><tbody><tr><td rowspan="1" class="en">jQuery</td><td class="en">this</td><td></td></tr></tbody></table></section><script>$(function(){$("button").click(function(){eval($(this).prev().prev().text());});});</script><section><h4><b>示例</b></h4><pre>$(&quot;.popup-menu&quot;).first().pile();</pre><br /><pre>$(&quot;.popup-menu&quot;).last().pile(8);</pre></section><section><h4><b>实例</b></h4><ol><li><a href="jQuery.fn.pile.0.html">测试用例演示</a></li></section><section><h4><b>文件</b></h4><ol class="en"><li><a href="jquery.js">jquery.js</a> (70.48KB)</li><li class="within"><a href="leko.js">leko.js</a> (20.68KB)</li></ol></section><footer><section id="foot"><hr /><h6>苏昱(苏小雨)作品<br />灵镭信息科技，创造代码之美</h6><a class="en" href="http://www.lekolite.cn" target="_blank">Copyright © 2010 lekolite.cn , All rights reserved</a></section></footer></div></body></html>